Get the path and name of the current fileΒΆ

Write a python program to get the path and name
of the file that is currently executing.
import os

print("Current File Name : ",os.path.realpath(__file__))

Output:

Current File Name :  /home/students/fb6e28e0-2425-11e7-807b-bd9de91b1602.py